package com.cap.bts.framework.auth.interceptor;

import org.springframework.core.NamedThreadLocal;

/**
 * @author annson
 * @date 
 */
public class AccessInfoContext {

    /**
     * 与线程绑定传递变量
     */
    private static NamedThreadLocal<AccessLog> accessInfo = new NamedThreadLocal<AccessLog>("accessInfo");


    public static NamedThreadLocal<AccessLog> getAccessInfo() {
        return accessInfo;
    }

    public static void setAccessInfo(NamedThreadLocal<AccessLog> accessInfo2) {
        accessInfo = accessInfo2;
    }


    public static AccessLog getRequestLog() {
        return accessInfo.get();
    }

    public static void setRequestLog(AccessLog AccessLog) {
        accessInfo.set(AccessLog);
    }
    public static void remove() {
        accessInfo.remove();
    }
}
